import { View } from "@tarojs/components";
import { Tab, Tabs } from "@antmjs/vantui";
import { Checkbox,Button } from "@taroify/core"
import DraftsItem from './components/draftsItem'
import './index.less'
import Taro from "@tarojs/taro";

const mockData: any = [
  {
    id: "1",
    checkDate: "2023-12-25",
    type: "普通食品生产",
    state:'未提交'
  },
  {
    id: "2",
    checkDate: "2023-12-20",
    type: "普通食品生产",
    state:'未提交'
  },
  {
    id: "3",
    checkDate: "2023-11-13",
    type: "普通食品生产",
    state:'未提交'
  },
  {
    id: "4",
    checkDate: "2023-11-18",
    type: "普通食品生产",
    state:'未提交'
  },
];
const DayReport: React.FC = () => {
  
  return (
  <View className="w-full h-full dayreport__wrapper">
  <Tabs animated className="w-full h-full">
    <Tab key="1" title="草稿箱">
      <View className="w-full h-full">
        <View className="m-3 text-slate-400">
          统计时间: 截止至今日日检查上报缺失数: 6/10
        </View>
        <View className="flex px-3 flex-row justify-between flex-nowrap w-full ">
          <Checkbox className="flex" size={24}>全选</Checkbox>
          <Button color="primary" size="small" className="flex" >批量提交</Button>
        </View>
        <View>
          {mockData.map((item:any)=>(
            <DraftsItem key={item.id} item={item}/>
            ))}
        </View>        
      </View>
      <View className="px-5  ">
        <Button color="primary" className="w-full fixed bottom-6" 
          onClick={() =>
            Taro.navigateTo({
              url: "/pages/IntelFilling/components/DayReport/components/fillingGuide/index",
            })
          }
        >点击开始检查</Button>
      </View>
    </Tab>
    <Tab key="2" title="已提交">
      
    </Tab>
  </Tabs>
  </View>
  )
};

export default DayReport;
